package com.wujing.abstractdemo

object OverriedMethod {

  def main(args: Array[String]): Unit = {
    val emp = new Emp
    emp.printName
  }


}
class Person1{
  var name:String ="tom"
  def printName: Unit ={
    println("打印name"+name)
  }
}

class Emp extends Person1{
  override def printName: Unit = {
    println("emp")
    super.printName
  }
}
